package org.csy.generic.test00.demo06.teacherWork;

import java.util.Arrays;

/**
 * @author CSY
 * @date 2025 - 03 - 27
 */
public class MainTest02 {
    public static void main(String[] args) {
        String[] arr = {"AA", "BB", "CC"};

        //要删除数据的下表
        int index = 2;
        System.arraycopy(arr,index+1,arr,index,arr.length-index-1);
        //清空末尾数据
        arr[arr.length-1] = null;
        System.out.println(Arrays.toString(arr));


    }
}
